<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
        }
        div{
            width: 100px;
            height: 100px;
            background: blue;
        }

        #top_mid{
            /*距离上下：0 ， 左右：auto（自适应）*/
            margin: 0 auto;
        }

    </style>
</head>
<body>

<div id="top_mid" ></div>

</body>
</html>